/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

#ifndef MK_RTSP_CONSUMER_H
#define MK_RTSP_CONSUMER_H
#include "MkMedia/MkMediaConsumer.h"

class MkApi CMkRtspConsume : public CMkMediaConsume
{
public:
    CMkRtspConsume();
    ~CMkRtspConsume();

    Uint32 ConsumeEsPacket(CMkMediaSource* pSource, const MkEsPacket& EsPacket, Uint8* pBuf, Uint32 nLen) override;
protected:
private:
};

class CMkRtspSession;
class MkApi CMkRtspConsumer : public CMkMediaConsumer
{
public:
    CMkRtspConsumer(CMkRtspSession* pRtspSession);
    ~CMkRtspConsumer();
    Uint32 ConsumeEsPacket(const MkEsPacket& EsPacket, const CMkVideoParam& VideoParam, const CMkAudioParam& AudioParam);
    Uint32 SessionRemoved();
protected:
private:
    void Release() override;
private:
    CMkRtspSession* m_pRtspSession;
};

#endif //MK_RTSP_CONSUMER_H